package com.func.domain.rebate.repository;

import com.func.domain.rebate.model.aggerate.BehaviorRebateAggregate;
import com.func.domain.rebate.model.entity.BehaviorRebateOrderEntity;
import com.func.domain.rebate.model.valobj.BehaviorTypeVO;
import com.func.domain.rebate.model.valobj.DailyBehaviorRebateTypeVO;

import java.util.List;

/**
 * <p>
 * IRebateRepository
 * </p>
 *
 * @author Simon
 * @version 2025.03.17.1.0.0
 * @description
 * @since 2025-03-17
 */

public interface IBehaviorRebateRepository {
    /**
     *  查询该行为类型的所有open状态的返利活动
     * @param behaviorTypeVO 行为类型
     * @return 返利活动值对象
     */
    List<DailyBehaviorRebateTypeVO> queryDailyBehaviorRebateConfig(BehaviorTypeVO behaviorTypeVO);

    /**
     * 将聚合对象入库, 发送其中的mq消息
     * @param userId 用户ID
     * @param behaviorRebateAggregates 行为返利聚合对象
     */
    void saveUserRebateRecord(String userId, List<BehaviorRebateAggregate> behaviorRebateAggregates);

    List<BehaviorRebateOrderEntity> queryOrderByOutBusinessNo(String userId, String outBusinessNo);
}
